* { box-sizing: border-box; }
html, body { height: 100%; }
body {
  margin: 0;
  font-family: -apple-system, BlinkMacSystemFont, 'Segoe UI', Roboto, 'Helvetica Neue', Arial, 'Noto Sans', 'Apple Color Emoji', 'Segoe UI Emoji', 'Segoe UI Symbol', 'Noto Color Emoji', sans-serif;
  color: #111;
  background: #f7f7f8;
}
header {
  padding: 24px 16px 0;
  text-align: center;
}
header h1 { margin: 0 0 6px; font-size: 24px; }
header .sub { margin: 0; color: #666; font-size: 14px; }
/* Minimal black & white navbar (pill buttons) */
.nav {
  display: inline-flex;
  gap: 8px;
  align-items: center;
  margin: 14px auto 8px;
  padding: 6px;
  border: 1px solid #e5e7eb;
  border-radius: 999px;
  background: #fff;
  box-shadow: 0 1px 2px rgba(0,0,0,0.04);
}
.nav a,
.nav a:link,
.nav a:visited {
  display: inline-block;
  padding: 8px 16px;
  border: 1px solid #111;
  border-radius: 999px;
  background: #fff;
  color: #111;
  text-decoration: none;
  font-weight: 600;
  font-size: 14px;
  line-height: 1;
  transition: background 0.2s ease, color 0.2s ease, border-color 0.2s ease, transform 0.05s ease-in-out;
}
.nav a:hover { background: #111; color: #fff; }
.nav a.active { background: #111; color: #fff; }
.nav a:focus-visible { outline: 2px solid #111; outline-offset: 2px; }
main { max-width: 920px; margin: 20px auto; padding: 0 16px 40px; }
.panel {
  background: #fff;
  border: 1px solid #e5e7eb;
  border-radius: 12px;
  padding: 16px;
  margin-bottom: 20px;
  box-shadow: 0 1px 2px rgba(0,0,0,0.04);
}
.form { display: grid; gap: 12px; }
label { font-weight: 600; font-size: 14px; }
textarea {
  width: 100%;
  padding: 10px 12px;
  border: 1px solid #d1d5db;
  border-radius: 8px;
  resize: vertical;
  font: inherit;
}
select, input[type="text"] {
  width: 100%; padding: 8px 10px; border: 1px solid #d1d5db; border-radius: 8px; font: inherit;
}
.row { display: grid; gap: 8px; }
button {
  width: fit-content;
  padding: 10px 16px;
  border: none;
  border-radius: 8px;
  background: #111827;
  color: #fff;
  font-weight: 600;
  cursor: pointer;
}
button:hover { background: #0b1220; }
.error { color: #b91c1c; background: #fee2e2; border: 1px solid #fecaca; padding: 8px 10px; border-radius: 8px; }
.grid { display: grid; gap: 12px; grid-template-columns: repeat(auto-fill, minmax(240px, 1fr)); }
.card { border: 1px solid #e5e7eb; border-radius: 12px; overflow: hidden; background: #fafafa; }
.card img { width: 100%; display: block; background: #eee; cursor: zoom-in; }
.card figcaption { padding: 8px 10px; font-size: 12px; color: #555; word-break: break-all; }
footer { text-align: center; padding: 10px 0 24px; color: #777; font-size: 12px; }

/* Lightbox */
.lightbox { position: fixed; inset: 0; display: none; align-items: center; justify-content: center; background: rgba(0,0,0,0.92); z-index: 9999; padding: 20px; }
.lightbox.open { display: flex; }
.lightbox img { max-width: 96vw; max-height: 96vh; object-fit: contain; border-radius: 8px; box-shadow: 0 8px 24px rgba(0,0,0,0.5); background: #111; }
.lightbox .lb-close { position: absolute; top: 12px; right: 16px; font-size: 28px; color: #fff; background: transparent; border: none; cursor: pointer; line-height: 1; }
